Contents ----- Copyright Previous Next

Use-Case 6: Improving The Vahunzation

As you just learned in the previous use-case, a source code can be unvahunzed. There is no possibility to avoid this, as there is no possibility that somebody reverse-engineers a binary.

Still, unvahunzing is a lot of work, and here are some hints how you can make it even harder. The main goal is: if someone views the source code, he should not see anything familiar.

Try to avoid string constants. If your application is localized and reads most strings from external catalogs, this should be the case already.

If not, declare string constants in other places then they are used. You can also tear string constants apart. For example, instead of

char *some_text = "hello";
you could use
char *some_text = "hel" "lo";
If now somebody scans the source for hello, he will not find anything.

Avoid calls to standard functions like printf, as they can not be vahunzed. Instead, write your own substitutes, or simply use defines:

#define my_printf              printf
#define my_OpenWindow          OpenWindow
#define my_IDCMP_REFRESHWINDOW IDCMP_REFRESHWINDOW

Now start to use my_printf where ever a printf is used. If you think it is too much work to update your whole source for that, then consider this the perfect time for The Great Renaming.

You can even redefine (or typedef) things like char and while.

If you use --random-seed, change the random seed with at least every public release. Otherwise, it would easily be possible to use a diff tool, and unvahunz only the new parts again.